Implementing Pinning Validation
-
A
TSKPinningValidatorinstance can be used to verify a server’s identity against an SSL pinning policy.In specific scenarios, TrustKit cannot intercept outgoing SSL connections and automatically validate the server’s identity against the pinning policy:
- All connections within an App that disables TrustKit’s network delegate swizzling by setting the
kTSKSwizzleNetworkDelegatesconfiguration key toNO. - Connections that do not rely on the
NSURLConnectionorNSURLSessionAPIs:WKWebViewconnections.- Connections leveraging low-level network APIs (such as
NSStream). - Connections initiated using a third-party SSL library such as OpenSSL.
For these connections, pin validation must be manually triggered using one of the two available methods within
See moreTSKPinningValidator.Declaration
Objective-C
@interface TSKPinningValidator : NSObjectSwift
class TSKPinningValidator : NSObject - All connections within an App that disables TrustKit’s network delegate swizzling by setting the
-
Possible return values when verifying a server’s identity against an SSL pinning policy.
See moreDeclaration
Objective-C
enum TSKTrustDecision {}Swift
enum TSKTrustDecision : Int
View on GitHub
Implementing Pinning Validation Reference